clear all;

baseline=load('baseline.mat','frac_highdist','dc_highdist','w_highdist','entre_highdist','output_highdist','income_gini');
s1=load('s1.mat','frac_highdist','dc_highdist','w_highdist','entre_highdist','output_highdist','income_gini');
s2=load('s2.mat','frac_highdist','dc_highdist','w_highdist','entre_highdist','output_highdist','income_gini');

figure('Position',[20,40,1200,720],'Color',[1,1,1])
subplot(2,3,1)
x=87:1:96;
axis square
plot(x,baseline.frac_highdist.*100,'-b','linewidth',2)
hold on
plot(x,s2.frac_highdist.*100,'--k','linewidth',2)
hold on
plot(x,s1.frac_highdist.*100,'-.r','linewidth',2)
legend('model','subsidize households','subsidize branches','interpreter','latex','location','northeast')
xlabel('year', 'FontSize',12,'Interpreter','Latex');
ylabel('fraction of new branches (\%)', 'FontSize',12,'Interpreter','Latex');
title( [{'A. Fraction of new branches'}, {'(markets with $d_{i,0} > \overline{d}$)'}], 'FontSize',15,'Interpreter','Latex');
xlim([87 96]);
ylim([60,100])
yticks(60:10:100)
set(gca,'FontSize',12);

subplot(2,3,2)
x=86:1:96;
axis square
plot(x,baseline.dc_highdist.*100,'-b','linewidth',2)
hold on
plot(x,s2.dc_highdist.*100,'--k','linewidth',2)
hold on
plot(x,s1.dc_highdist.*100,'-.r','linewidth',2)
xlabel('year', 'FontSize',12,'Interpreter','Latex');
ylabel('deposit-cash ratio (\%)', 'FontSize',12,'Interpreter','Latex');
title( [{'B. Deposit-cash ratio'}, {'(markets with $d_{i,0} > \overline{d}$)'}], 'FontSize',15,'Interpreter','Latex');
xlim([86 96]);
ylim([0,90])
yticks(0:30:90)
set(gca,'FontSize',12);

subplot(2,3,3)
x=86:1:96;
axis square
plot(x,baseline.w_highdist,'-b','linewidth',2)
hold on
plot(x,s2.w_highdist,'--k','linewidth',2)
hold on
plot(x,s1.w_highdist,'-.r','linewidth',2)
xlabel('year', 'FontSize',12,'Interpreter','Latex');
ylabel('wealth', 'FontSize',12,'Interpreter','Latex');
title( [{'C. Wealth'}, {'(markets with $d_{i,0} > \overline{d}$)'}], 'FontSize',15,'Interpreter','Latex');
xlim([86 96]);
ylim([1,2.2])
yticks(1:0.4:2.2)
set(gca,'FontSize',12);


subplot(2,3,4)
x=86:1:96;
axis square
plot(x,baseline.entre_highdist.*100,'-b','linewidth',2)
hold on
plot(x,s2.entre_highdist.*100,'--k','linewidth',2)
hold on
plot(x,s1.entre_highdist.*100,'-.r','linewidth',2)
xlabel('year', 'FontSize',12,'Interpreter','Latex');
ylabel('fraction of entrepreneurs (\%)', 'FontSize',12,'Interpreter','Latex');
title( [{'D. Fraction of entrepreneurs'}, {'(markets with $d_{i,0} > \overline{d}$)'}], 'FontSize',15,'Interpreter','Latex');
xlim([86 96]);
ylim([8,14])
yticks(8:2:14)
set(gca,'FontSize',12);

subplot(2,3,5)
x=86:1:96;
axis square
plot(x,baseline.output_highdist,'-b','linewidth',2)
hold on
plot(x,s2.output_highdist,'--k','linewidth',2)
hold on
plot(x,s1.output_highdist,'-.r','linewidth',2)
xlabel('year', 'FontSize',12,'Interpreter','Latex');
ylabel('output', 'FontSize',12,'Interpreter','Latex');
title( [{'E. Output'}, {'(markets with $d_{i,0} > \overline{d}$)'}], 'FontSize',15,'Interpreter','Latex');
xlim([86 96]);
ylim([1,1.8])
yticks(1:0.2:1.8)
set(gca,'FontSize',12);


subplot(2,3,6)
x=86:1:96;
axis square
plot(x,baseline.income_gini,'-b','linewidth',2)
hold on
plot(x,s2.income_gini,'--k','linewidth',2)
hold on
plot(x,s1.income_gini,'-.r','linewidth',2)
xlabel('year', 'FontSize',12,'Interpreter','Latex');
ylabel('income Gini', 'FontSize',12,'Interpreter','Latex');
title( 'F. Income Gini', 'FontSize',15,'Interpreter','Latex');
xlim([86 96]);
ylim([0.36,0.45])
yticks(0.36:0.03:0.45)
set(gca,'FontSize',12);